import pytest,HTMLTestRunner_cn
import yagmail


def baogao():
    baogao1=HTMLTestRunner_cn.HTMLTestRunner('./baogao.html',description='abc')
    return baogao1

def emailll():
    ema=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com',port='465')
    ema.send(to='2314336117@qq.com',subject='11.4周考',contents=['baogao.html'])

if __name__ == '__main__':
    pytest.main([r'C:\Users\23143\PycharmProjects\pythonProject911\zhoukao3_114\Case.py','-s','--html=baogao.html'])
    emailll()